﻿using System;
using Framework;

namespace Enterprise.Admin.Handle
{
    /// <summary>
    /// 删除产品资料
    /// </summary>
    public partial class DeleteProdcut : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            object result;
            try
            {
                int id = Fq("id").SafeToInt();
                var productService = new ProductService();
                productService.Delete(id);
                result = new { state = true, message = "删除成功！" };
            }
            catch (Exception ex)
            {
                result = new { state = false, message = ex.Message };
            }
            Json(result);
        }
    }
}